{{extend "charts_layout.html"}}

{{block menu}}
{{menu('charts')}}
{{end}}

{{block sub_menu}}
{{sub_menu(menu_items, 'resource','sum_sys_month')}}
{{end}}

{{block content_tool}}
<form action="">
起始月份：<input class="datepicker" type="text" name="begin_date" size="10" value="{{=begin_date}}"></input>
结束月份：<input class="datepicker" type="text" name="end_date" size="10" value="{{=end_date}}"></input>
<input type="submit" value="查询"></input>
</form>

<script>
$(function() {
        $('input.datepicker').datepicker({ dateFormat: 'yy-mm-dd' });
    });
</script>

{{end}}

{{block content_main}}
{{use "jquery"}}
{{use "jqpagination"}}
{{use "jsquery"}}
{{use "fgbutton"}}

<script type="text/javascript">
  $(function(){
      var width = $(window).width() - 250;
      $('#content_main').width(width);
  });
</script>

<div id="tabs">   
    <div class="left"><font color="red">单位：人(计算方式：人天数/当月工作日)</font></div>
    <div id="content_main" class="box" style="overflow-x:auto;padding-bottom:20px;">        
    {{embed table}}
    </div>
    <div class="box-bottom">
    <div class="left">共有：<font color="red">{{=info['total']}}</font> 条记录</div>
    <div class="left">&nbsp;<a id="download" href="#"><img src="{{=url_for_static('images/csv.png')}}" title="下载"/></a></div>        
    <div class="clear"></div>
    <script type="text/javascript">
    $(function(){
        var query_string = $.query.set('download', '').toString();
        $('#download').click(function(){
            window.location = query_string;
            return false;
        });
    });
    </script>
    
</div>

{{end}}
